package cn.wolfcode.rbac.query;
/*
分页查询
 */
import org.springframework.util.StringUtils;

public class QueryObject
{
    public void setCurrentPage(int currentPage)
    {
        this.currentPage = currentPage;
    }

    public void setPageSize(int pageSize)
    {
        this.pageSize = pageSize;
    }

    public void setKeyword(String keyword)
    {
        this.keyword = keyword;
    }

    public int getCurrentPage()
    {
        return this.currentPage;
    }

    private int currentPage = 1;

    public int getPageSize()
    {
        return this.pageSize;
    }

    private int pageSize = 3;
    private String keyword;//接收姓名和邮箱模糊查询值。关键字

    public int getStart()
    {
        return (this.currentPage - 1) * this.pageSize;
    }

    public String getKeyword()
    {
        return StringUtils.hasLength(this.keyword) ? this.keyword : null;
    }
}
